import Main from './index.vue';
import platform from '@src/platform';
import {t as $t} from "@src/locales";

// 处理注入的参数
let initData = {};

try {
  initData = JSON.parse(window._init || '{}') || {};
  if (window.frameElement) {
    const currentTabId = window.frameElement.dataset.id;
    platform.setTabTitle({
      id: currentTabId,
      title: $t('common.pageTitle.pageServiceProviderDetail')
    })
  }
} catch (error) {
  console.error(error);
  console.error('no init data')
}

/*const App = new Vue({
  el: '#app',
  provide: {
    initData: Object.freeze(initData)
  },
  render: h => h(Main),
});*/

let app = {
  provide: {
    initData: Object.freeze(initData),
  },
  render: h => h(Main)
}

export default app;